/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.magri.aula2.exercicio4;

/**
 *
 * @author Magri
 */
public class Televisao implements IAparelhoEletronico {

    private boolean ligada;
    private int volume;
    private int canal;
    
    private String marca;
    private String modelo;

    public Televisao(String marca, String modelo) {
        this.marca = marca;
        this.modelo = modelo;
    }
    
    
    
    @Override
    public void ligar() {
        ligada = true;
    }

    @Override
    public void desligar() {
        ligada = false;
    }

    @Override
    public void aumentarVolume() {
        volume++;
    }

    @Override
    public void diminuirVolume() {
        volume--;
    }

    @Override
    public void adiantarCanal() {
        canal++;
    }

    @Override
    public void retrocederCanal() {
        canal--;
    }
    
    public String toString() {
        return modelo + " " + (ligada ? "Ligada" : "Desligada") + " canal: " + canal + " Volume: " + volume;
    }

    @Override
    public void play() {
        throw new UnsupportedOperationException("Funcao nao suportada.");
    }

    @Override
    public void stop() {
        throw new UnsupportedOperationException("Funcao nao suportada.");
    }
}
